package com.sakura.probe.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Sakura
 * @since 2020-09-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pb_person_footprint")
@ApiModel(value="PbPersonFootprint对象", description="用户浏览足迹的记录")
public class FootPrint implements Serializable {

    @ApiModelProperty(value = "id")
    @TableId(value = "footprint_id", type = IdType.AUTO)
    private Integer footprintId;

    @ApiModelProperty(value = "访问者的id")
    private Long userId;

    @ApiModelProperty(value = "访问动态的id")
    private Long topicId;

    @ApiModelProperty(value = "访问时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date lastEditTime;

    @TableField(exist = false)
    private Topic topic;

    @TableField(exist = false)
    private PersonInfo personInfo;

    public FootPrint(){

    }

    public FootPrint(Long userId, Long topicId) {
        this.userId = userId;
        this.topicId = topicId;
    }
}
